﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ExtendPropertyLib.WPF;
using ExORMDesginer.Models;
using ExORMDesginer.Services;
using ExtendPropertyLib;

namespace ExORMDesginer.UserControls.Dialogs
{
    public class ConnectionVSIdeDialogInfo : BusinessInfoBase<ConnectionVSIdeDialogInfo>
    {
     
        public ConnectionVSIdeDialogInfo()
        {
            RunningIDEs = VSIDEService.GetRunIde();
        }

        public static ExtendProperty RunningIDEsProperty = RegisterProperty(m => m.RunningIDEs);
        /// <summary>
        /// 正在运行的VS编辑器
        /// </summary>
        public List<IDEInfo> RunningIDEs
        {
            set
            {
                SetValue(RunningIDEsProperty, value);
            }
            get
            {
                return (List<IDEInfo>)GetValue(RunningIDEsProperty);
            }
        }

        /// <summary>
        /// 连接VS编辑器
        /// </summary>
        /// <param name="info"></param>
        public void ConnectIDE(IDEInfo info)
        {
            VSIDEService.ConnectionVSIde = info;

        }



    }
}
